package jmine.tec.web.wicket.behavior;

import org.apache.wicket.behavior.AbstractBehavior;
import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.IHeaderResponse;

/**
 * @author icaro
 */
public class DisableDefaultConfirmBehavior extends AbstractBehavior implements IHeaderContributor {
    private static final long serialVersionUID = 1L;

    /**
     * {@inheritDoc}
     */
    @Override
    public void renderHead(IHeaderResponse response) {
        response.renderOnDomReadyJavascript("Wicket.Window.unloadConfirmation = false");
    }
}
